package com.at.c02_classloader.linking;

/**
 * 若该类具有父类，JVM会保证子类的<clinit>()执行前，父类的<clinit>()已经执行完毕
 *
 * @author huangchao E-mail:fengquan8866@163.com
 * @version 创建时间：2024/6/22 21:52
 */
public class ClinitTest1 {
    static class Father {
        public static int A = 1;

        static {
            A = 2;
        }
    }

    static class Son extends Father {
        public static int B = A;
    }

    public static void main(String[] args) {
        System.out.println(Son.B);
    }
}
